#pragma once

#include <semaphore.hpp>
#include <task_run.hpp>

class WorkQueue;

class WorkQueueRun : public TaskRun
{
public:
	WorkQueueRun(int priority, int stackSize, int rate, const char* taskName, int cpuId);
	~WorkQueueRun();
	void Append(WorkQueue* workQueue);

protected:
	void Run(void* arg);

private:
	Semaphore m_SemRw;
	std::list<WorkQueue*> m_WQList;
	int m_SleepMS;
};